import java.util.Arrays;
import java.util.PriorityQueue;
import java.util.stream.IntStream;

public class demo1 {
    public static void main(String[] args) {
        int []arr={1,2,3};
        IntStream stream= Arrays.stream(arr);
        int sum=stream.sum();
        System.out.println(sum);
        PriorityQueue priorityQueue=new PriorityQueue<Integer>((a, b)-> b.compareTo(a));
        int n=arr.length;
        for (int i = 0; i <n; i++) {
            priorityQueue.offer(arr[i]);
        }
        System.out.println(priorityQueue.peek());
    }
}
